home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGNG_C
/
CUG187.LZH
/
KBECHO.C
< prev
next >
Wrap
Text File
|
1985-12-30
|
1KB
|
42 lines
/*@*****************************************************/
/*@ */
/*@ kbecho - collects characters from a keyboard input */
/*@ routine, expands control chars to reverse */
/*@ video names, and writes them when a line */
/*@ is full. */
/*@ */
/*@ Usage: kbecho(char); */
/*@ where char is the char to be echoed. */
/*@ */
/*@*****************************************************/
/***********************************************************************/
/* */
/* The following are specific for the IBM PC. */
/* */
/***********************************************************************/
#define NORM 0x07 /* normal video attribute */
/***********************************************************************/
#define EOS 0x00 /* end of string */
char strbuf[20];
int charcnt = 0;
kbecho(KbChar)
char KbChar;
{
int showch();
charcnt += showch(KbChar);
if (charcnt >= 75) {
charcnt = 0;
strbuf[0] = '\n';
strbuf[1] = EOS;
conout(strbuf,NORM);
}
}